<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
	Project		: SUMMON
	Developer	: APPropolis Inc.
	Programmer	: Mark Vincent M. Lorenzo
	(c) 2014
*/

class Home extends CI_Controller {

	public function __construct() {
		parent::__construct();
		//$this->output->cache(60);
		ini_set('session.cookie_httponly',1); 
		ini_set('session.use_only_cookies',1);
		$this->load->model('users_class');
		$this->load->model('auth_class');
	}	
	public function index()
	{
		$this->auth_class->active_session();
		$data['msgStatus'] = $this->process_login();
		
		$this->load->view('commons/header', $data);
		$this->load->view('home/commons/css');
		$this->load->view('home/index');
		$this->load->view('commons/js');
		$this->load->view('commons/footer');
	}
	public function process_login()
	{
		$post = $this->input->post();
		$cmd = $this->users_class->check_login($post);
		return $cmd['intStatus'];
	}
}